<#include "/classic/inc/layout_map.ftl"/>

<@layout >
	<div>
		<style>
			#map {
				width: 100%;
				height: 100vh ;
				background: #f6f6f6;
			}
		</style>
		</head>

		<body>
		<div id="map">

		</div>
		<script>
			window.onload = function () {
				var map = L.map('map', { crs: L.CRS.EPSG4326 ,zoomControl: false,zoom:13}).setView([36.692881512539356 ,117.21367753002928], 13);
				//var map = L.map('map').setView([30.46337852800008, 120.967045726], 7);
				var geojson;
				var layer;
				$.ajax({
					url: "${base}/dist/map/json/tangye.json",
					success: function (data) {
						geojson = L.geoJSON(data);
						//天地图影像底图
						layer = L.TileLayer.clip(' http://service.sdmap.gov.cn/tileservice/sdrasterpubmap?tk=d386ca8b8d65b7a806b06ad9e7b99739&layer=SDRasterPubMap&style=default&tilematrixset=raster&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fjpeg&TileMatrix={z}&TileCol={x}&TileRow={y}', {
							polygons: [geojson.getLayers()[0]],
							maxZoom: 17,
							minZoom:13,
							tileSize: 256,
							zoomOffset: 1,
							mode: "show"
						}).addTo(map);
						layer = L.TileLayer.clip('http://service.sdmap.gov.cn/tileservice/sdrasterpubmapdj?tk=d386ca8b8d65b7a806b06ad9e7b99739&layer=SDRasterPubMapDJ&style=default&tilematrixset=raster&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fjpeg&TileMatrix={z}&TileCol={x}&TileRow={y}', {
							polygons: [geojson.getLayers()[0]],
							maxZoom: 17,
							minZoom:13,
							tileSize: 256,
							zoomOffset: 1,
							mode: "show"
						}).addTo(map);
					}
				});


			}


		</script>
	</div>
</@layout>
